<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="/system/layui/css/layui.css" media="all">
</head>
<body>
<br>
<form class="layui-form" style="width:80%;">
    <a type="submit" onclick="sub()" class="layui-btn layui-btn-warm" style="margin-left:160px;position:absolute;top:400px;">修改</a>
    <input type="hidden" th:value="${staffBean.id}" class="id">
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工姓名</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input name" placeholder="请输入名称" th:value="${staffBean.name}">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工年龄</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input age" placeholder="请输入年龄" th:value="${staffBean.age}">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">工作年限</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input workYear" placeholder="请输入工作年限" th:value="${staffBean.workYear}">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">员工能力</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input ability" placeholder="请输入员工能力" th:value="${staffBean.ability}">
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12 layui-form">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">岗位</label>
        <div class="layui-input-block">
            <select class="post">
                <option th:each="post:${list2}" th:value="${post.id}" th:text="${post.name}" th:checked="${post.id==staffBean.id}"></option>
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-row layui-col-xs12">
        <label class="layui-form-label" style="background-color: #009688;color: #F8F8F8;width: 60px;">评分</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input grade" placeholder="请输入员工分数" th:value="${staffBean.grade}">
        </div>
    </div>
</form>
</body>
<script type="text/javascript" src="/system/layui/layui.js"></script>
<script type="text/javascript" src="/system/js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="/staff/edit.js"></script>
<script>
    layui.use('form', function() { //此段代码必不可少
        var form = layui.form;
        form.render();
    });
</script>
</html>